{App::registerCoreScript('jquery')}
{App::registerCoreScript('base')}
<table class="list ajax_edit">
	<tr>
		<th class="_20">Ред.</th>
		<th>Владелец</th>
		<th>Название</th>
		<th>Описание</th>
		<th class="_20">Удл.</th>
	</tr>
	{foreach $galleries as $gallery}
		<tr class="save" rel="{$gallery->id}">
			<td class="center">
				<a href="#" class="edit" rel="{$gallery->id}"><img src="{$tpl_url}images/pencil.png"/></a>
			</td>
			<td>
				{$gallery->Owner->login}
			</td>
			<td>
				{$gallery->title}
			</td>
			<td>
				{$gallery->description}
			</td>
			<td class="center">
				<a href="{$base_url}&action=gallery_delete&id={$gallery->id}" class="delete"><img src="{$tpl_url}images/trash.png"/></a>
			</td>
		</tr>
		<tr class="edit" rel="{$gallery->id}" style="display: none;">
			{include file="gallery_form.html" gallery=$gallery}
		</tr>
	{/foreach}
	<tr>
		{include file="gallery_form.html" gallery=$_gallery}
	</tr>
</table>